API Help
EPLAN API / API Reference / Actions / plcservice
In This Topic
    plcservice
    In This Topic
    Exports/imports PLC data using the specified converter.
    

    Parameter Description

    TYPE

    Type of task to be performed by the action
    BUSDATAEXPORT: Bus data export.
    BUSDATAIMPORT: Bus data import.
    GENERATEPLCSCHEMATIC: Schematics generation.
    

    PROJECTNAME

    Project name with full path.
    

    LANGUAGE

    Language identifier 
    This parameter is only effective with the following values of the TYPE parameter: BUSDATAEXPORT, BUSDATAIMPORT
    

    CONVERTERID

    Identification for busdata exporter. Values are:
    • PlcDcExchangerMitsubishiAML = Mitsubishi iQ-Works
    • PlcDcExchangerSiemensTIAAML = Siemens SIMATIC STEP 7 TIA-Portal
    • PlcDcXMLExchangerABB = ABB Automation Suite
    • PlcDcXMLExchangerBandR = B and R Automation Studio
    • PlcDcXMLExchangerBeckhoff = Beckhoff TwinCAT
    • PlcDcXMLExchangerCodesys = 3S Codesys
    • PlcDcXMLExchangerLogiCals = logi.cals Automation
    • PlcDcXMLExchangerMitsubishi = Mitsubishi GX Works
    • PlcDcXMLExchangerRexroth = Rexroth IndraWorks
    • PlcDcXMLExchangerSchneider = Schneider Unity Pro
    • PlcDcXMLExchangerSiemens = Siemens SIMATIC STEP 7
    • PlcDcXMLExchangerUniversal = PLC standard exchange format
    • XMLRockwellExchanger = RSLogix Architect
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAEXPORT, BUSDATAIMPORT
    

    CONFIGURATIONPROJECT

    The name of the PLC configuration data set to export. 
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAEXPORT
    

    DESTINATIONFILE

    Destination file for data export.
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAEXPORT
    

    SOURCEFILE

    Source file for data import.
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAIMPORT.
    

    OVERWRITE

    If the output file already exists, this parameter specifies      whether it should be overwritten.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAEXPORT.
    

    IMPORTMATCH

    Matching options for PLC data import. 
    The import process tries to match imported objects with those existing in the project.
    Based on the option selected, the matching may be performed by internal object ids or by objects' identifying names.
    If an imported object is matched with an existing function, properties of the existing function will be updated whereas for unmatched imported objects, new functions will be created in the project.
    The options are:
    0 = Match by internal object ids.
    1 = Match by identifying names. Note: in this case, a comparison dialog may be displayed for the user to individually selecting some function to update.
    2 = Don't match. Create new functions for all imported objects.
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAIMPORT.
    

    SHOWCOMPAREDLG

    Shows compare dialog.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:BUSDATAIMPORT.
    

    CONFIGFILE

    A path to a  configuration file for schematics generation.
    This parameter is only effective with the following values of the TYPE parameter:GENERATEPLCSCHEMATIC.
    

    SINGLELINEPAGES

    If set, single-line pages will be generated.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:GENERATEPLCSCHEMATIC.
    

    MULTILINEPAGES

    If set, multi-line pages will be generated.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:GENERATEPLCSCHEMATIC.
    

    OVERVIEWS

    If set, overview pages will be generated.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:GENERATEPLCSCHEMATIC.
    

    RACKOVERVIEWS

    If set, rack overview pages will be generated.
    Possible values: '0' - No (default), '1' - Yes.
    This parameter is only effective with the following values of the TYPE parameter:GENERATEPLCSCHEMATIC.
    

    Example
    Bus data export:
    
    plcservice 
                    /TYPE:BUSDATAEXPORT
                    /CONFIGURATIONPROJECT:Schneider-Electric
                    /DESTINATIONFILE:"c:\tempdir\plcservice_export_1.xef"
                    /PROJECTNAME:"C:\Users\Public\EPLAN\Electric P8\Projects\Microsoft\ESS_Sample_Project.elk" 
                    /LANGUAGE:de_DE
                    /CONVERTERID:PlcDcXMLExchangerSchneider
                    /OVERWRITE:1
    
    Bus data import:
    
    plcservice 
                    /TYPE:BUSDATAIMPORT
                    /SOURCEFILE:"c:\tempdir\plcservice_export_2.pbf"
                    /PROJECTNAME:"C:\Users\Public\EPLAN\Electric P8\Projects\Microsoft\ESS_Sample_Project.elk" 
                    /LANGUAGE:de_DE
                    /CONVERTERID:PlcDcXMLExchangerUniversal
    
    Schematics generation:
    
    plcservice 
                    /TYPE:GENERATEPLCSCHEMATIC
                    /PROJECTNAME:"C:\Users\Public\EPLAN\Electric P8\Projects\Microsoft\ESS_Sample_Project.elk" 
                    /CONFIGFILE:"c:\tempdir\schematics_generation_config.xml"
                    /SINGLELINEPAGES:1
                    /MULTILINEPAGES:1